package com.demo.solution;

import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Test99 {

    public static void main(String[] args) throws Exception {

        Test99 t = new Test99();

        t.equals(new Test99());
        ((Object)t).equals(new Test99());

        System.out.println(t.hashCode());
        System.out.println(((Object)t).hashCode());

        Map<Test99, String> map = new HashMap<Test99, String>();
        map.put(new Test99(), null);
        map.put(new Test99(), null);
        map.put(new Test99(), null);
    }

    public boolean equals(Object o) {
        System.out.println("ooooo");
        return this==o;
    }

    public boolean equals(Test99 o) {
        System.out.println("ttttt");
        return this==o;
    }

    public int hashCode(){
        return 16;
    }


}

class Father {
    static {
        System.out.println("Father static1");
    }

    static {
        System.out.println("Father static2");
    }

    public Father() {
        System.out.println("Father  constructor");
    }

    {
        System.out.println("Father non-static1");
    }

    {
        System.out.println("Father non-static2");
    }

}

class Child extends Father {
    static {
        System.out.println("Child static1");
    }

    static {
        System.out.println("Child static2");
    }

    public Child() {
        System.out.println("Child  constructor");
    }

    {
        System.out.println("Child non-static1");
    }

    {
        System.out.println("Child non-static2");
    }

}